package com.niuxiaofa.newlaw.Activity;

import android.widget.LinearLayout;
import android.widget.TextView;


import com.niuxiaofa.newlaw.Base.BaseActivity;
import com.niuxiaofa.newlaw.R;
import com.niuxiaofa.newlaw.Tools.ToActivityUtil;
import com.niuxiaofa.newlaw.Tools.UIUtils;
import com.niuxiaofa.newlaw.View.CleanCacheDialog;

import butterknife.BindView;

public class SettingActivity extends BaseActivity {


    @BindView(R.id.account_setting)
    TextView account_setting;

    @BindView(R.id.dafen)
    TextView dafen;

    @BindView(R.id.clean_cache)
    TextView clean_cache;


    @BindView(R.id.login_out)
    LinearLayout login_out;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting;
    }


    @Override
    protected void initData() {


        setTitle("设置");

        account_setting.setOnClickListener(e -> {

            ToActivityUtil.toNextActivity(AccountSettingActivity.class);
        });

        dafen.setOnClickListener(e -> {


        });

        clean_cache.setOnClickListener(e -> {
            CleanCacheDialog cleanCacheDialog = new CleanCacheDialog(UIUtils.getActivity(), new CleanCacheDialog.Onclick() {
                @Override
                public void click() {
                    Toast("缓存已清除");
                }
            });
            cleanCacheDialog.show();
        });

        login_out.setOnClickListener(e->{
            ToActivityUtil.toNextActivity(LoginActivity.class);
        });


    }
}
